package com.zr.inquiryenum;

/**
 * Created by 天赐 on 2019/12/25.
 */
public enum inquiryStatusEnum {

    GOUMAI("购买询价",1),CHULI("处理询价",0),BAIFEI("保废询价",2);

    private String name;
    private Integer value;

    private inquiryStatusEnum(String name, Integer value){
        this.name=name;
        this.value=value;

    }

    //普通方法 通过value获取名称
    public static  String getName(Integer value) {
        for (inquiryStatusEnum c: inquiryStatusEnum.values()) {
            if (c.getValue()==value){
                return c.name;
            }
        }
        return null;
    }
    public String getName(){
        return name;
    }
    public Integer getValue(){
        return value;
    }
}
